package com.itzyf.pokemondata.activity.illustration

import android.content.Intent
import com.itzyf.pokemondata.R
import com.itzyf.pokemondata.activity.DrillRecordActivity
import com.itzyf.pokemondata.activity.HuntingGroundActivity
import com.itzyf.pokemondata.adapter.MenuAdapter
import com.itzyf.pokemondata.bean.MainDo
import com.tydic.baselibrary.activity.BaseActivity
import kotlinx.android.synthetic.main.activity_main.*


class IllustrationActivity : BaseActivity() {

    override fun handlerActivity() {
        val mainList = mutableListOf(
            MainDo("专属道具", R.drawable.ic_exclusive, ExclusiveActivity::class.java),
            MainDo("道具图鉴", R.drawable.ic_prop, PropActivity::class.java),
            MainDo("特性图鉴", R.drawable.ic_characteristic, CharacteristicActivity::class.java),
            MainDo("技能图鉴", R.drawable.ic_skill, SkillActivity::class.java),
            MainDo("超级招式图鉴", R.drawable.ic_super_skill, SuperSkillActivity::class.java)
        )
        val adapter = MenuAdapter(R.layout.item_main, mainList)
        rv_list.adapter = adapter
        rv_list.addItemDecoration(
            androidx.recyclerview.widget.DividerItemDecoration(
                this,
                androidx.recyclerview.widget.DividerItemDecoration.VERTICAL
            )
        )
        adapter.setOnItemClickListener { _, _, position ->
            val intent = Intent(this@IllustrationActivity, mainList[position].clazz)
            startActivity(intent)
        }

    }


    override fun getContentViewId() = R.layout.activity_main

    override fun getToolbarTitle() = "图鉴大全"

}
